package com.ruoyi.kk.division.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kk.division.mapper.KkSysAdministrativeDivisionMapper;
import com.ruoyi.kk.division.domain.KkSysAdministrativeDivision;
import com.ruoyi.kk.division.service.IKkSysAdministrativeDivisionService;

/**
 * 全国行政区划信息Service业务层处理
 * 
 * @author kk
 * @date 2025-06-09
 */
@Service
public class KkSysAdministrativeDivisionServiceImpl implements IKkSysAdministrativeDivisionService 
{
    @Autowired
    private KkSysAdministrativeDivisionMapper kkSysAdministrativeDivisionMapper;

    /**
     * 查询全国行政区划信息
     * 
     * @param code 全国行政区划信息主键
     * @return 全国行政区划信息
     */
    @Override
    public KkSysAdministrativeDivision selectKkSysAdministrativeDivisionByCode(String code)
    {
        return kkSysAdministrativeDivisionMapper.selectKkSysAdministrativeDivisionByCode(code);
    }

    /**
     * 查询全国行政区划信息列表
     * 
     * @param kkSysAdministrativeDivision 全国行政区划信息
     * @return 全国行政区划信息
     */
    @Override
    public List<KkSysAdministrativeDivision> selectKkSysAdministrativeDivisionList(KkSysAdministrativeDivision kkSysAdministrativeDivision)
    {
        return kkSysAdministrativeDivisionMapper.selectKkSysAdministrativeDivisionList(kkSysAdministrativeDivision);
    }

    /**
     * 新增全国行政区划信息
     * 
     * @param kkSysAdministrativeDivision 全国行政区划信息
     * @return 结果
     */
    @Override
    public int insertKkSysAdministrativeDivision(KkSysAdministrativeDivision kkSysAdministrativeDivision)
    {
        return kkSysAdministrativeDivisionMapper.insertKkSysAdministrativeDivision(kkSysAdministrativeDivision);
    }

    /**
     * 修改全国行政区划信息
     * 
     * @param kkSysAdministrativeDivision 全国行政区划信息
     * @return 结果
     */
    @Override
    public int updateKkSysAdministrativeDivision(KkSysAdministrativeDivision kkSysAdministrativeDivision)
    {
        return kkSysAdministrativeDivisionMapper.updateKkSysAdministrativeDivision(kkSysAdministrativeDivision);
    }

    /**
     * 批量删除全国行政区划信息
     * 
     * @param codes 需要删除的全国行政区划信息主键
     * @return 结果
     */
    @Override
    public int deleteKkSysAdministrativeDivisionByCodes(String[] codes)
    {
        return kkSysAdministrativeDivisionMapper.deleteKkSysAdministrativeDivisionByCodes(codes);
    }

    /**
     * 删除全国行政区划信息信息
     * 
     * @param code 全国行政区划信息主键
     * @return 结果
     */
    @Override
    public int deleteKkSysAdministrativeDivisionByCode(String code)
    {
        return kkSysAdministrativeDivisionMapper.deleteKkSysAdministrativeDivisionByCode(code);
    }
}
